Integrand size = 26, antiderivative size = 49 \[ \int \cot ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^2 \, dx=-\frac {4 \sqrt [4]{-1} a^2 \text {arctanh}\left ((-1)^{3/4} \sqrt {\cot (c+d x)}\right )}{d}-\frac {2 a^2 \sqrt {\cot (c+d x)}}{d} \]
Time = 0.61 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.10 \[ \int \cot ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^2 \, dx=-\frac {2 a^2 \sqrt {\cot (c+d x)} \left (1+2 (-1)^{3/4} \arctan \left ((-1)^{3/4} \sqrt {\tan (c+d x)}\right ) \sqrt {\tan (c+d x)}\right )}{d} \]
(-2*a^2*Sqrt[Cot[c + d*x]]*(1 + 2*(-1)^(3/4)*ArcTan[(-1)^(3/4)*Sqrt[Tan[c + d*x]]]*Sqrt[Tan[c + d*x]]))/d
Time = 0.39 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {3042, 4156, 3042, 4026, 3042, 4016, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cot ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cot (c+d x)^{3/2} (a+i a \tan (c+d x))^2dx\) |
\(\Big \downarrow \) 4156 |
\(\displaystyle \int \frac {(a \cot (c+d x)+i a)^2}{\sqrt {\cot (c+d x)}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (-a \tan \left (c+d x+\frac {\pi }{2}\right )+i a\right )^2}{\sqrt {-\tan \left (c+d x+\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 4026 |
\(\displaystyle -\frac {2 a^2 \sqrt {\cot (c+d x)}}{d}+\int \frac {2 i a^2 \cot (c+d x)-2 a^2}{\sqrt {\cot (c+d x)}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {2 a^2 \sqrt {\cot (c+d x)}}{d}+\int \frac {-2 i \tan \left (c+d x+\frac {\pi }{2}\right ) a^2-2 a^2}{\sqrt {-\tan \left (c+d x+\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 4016 |
\(\displaystyle -\frac {2 a^2 \sqrt {\cot (c+d x)}}{d}+\frac {8 a^4 \int \frac {1}{2 i \cot (c+d x) a^2+2 a^2}d\sqrt {\cot (c+d x)}}{d}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle -\frac {4 \sqrt [4]{-1} a^2 \text {arctanh}\left ((-1)^{3/4} \sqrt {\cot (c+d x)}\right )}{d}-\frac {2 a^2 \sqrt {\cot (c+d x)}}{d}\) |
3.8.26.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(b_.)*tan[(e_.) + (f_.)*(x_ )]], x_Symbol] :> Simp[2*(c^2/f) Subst[Int[1/(b*c - d*x^2), x], x, Sqrt[b *Tan[e + f*x]]], x] /; FreeQ[{b, c, d, e, f}, x] && EqQ[c^2 + d^2, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[d^2*((a + b*Tan[e + f*x])^(m + 1)/(b*f*( m + 1))), x] + Int[(a + b*Tan[e + f*x])^m*Simp[c^2 - d^2 + 2*c*d*Tan[e + f* x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && !LeQ [m, -1] && !(EqQ[m, 2] && EqQ[a, 0])
Int[(cot[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x _)]^(n_.))^(p_.), x_Symbol] :> Simp[d^(n*p) Int[(d*Cot[e + f*x])^(m - n*p )*(b + a*Cot[e + f*x]^n)^p, x], x] /; FreeQ[{a, b, d, e, f, m, n, p}, x] && !IntegerQ[m] && IntegersQ[n, p]
Result contains complex when optimal does not.
Time = 1.29 (sec) , antiderivative size = 191, normalized size of antiderivative = 3.90
method | result | size |
derivativedivides | \(-\frac {a^{2} \left (2 \left (\sqrt {\cot }\left (d x +c \right )\right )-\frac {\sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}{1+\cot \left (d x +c \right )-\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )\right )}{2}+\frac {i \sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )-\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}{1+\cot \left (d x +c \right )+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )\right )}{2}\right )}{d}\) | \(191\) |
default | \(-\frac {a^{2} \left (2 \left (\sqrt {\cot }\left (d x +c \right )\right )-\frac {\sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}{1+\cot \left (d x +c \right )-\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )\right )}{2}+\frac {i \sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )-\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}{1+\cot \left (d x +c \right )+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )\right )}{2}\right )}{d}\) | \(191\) |
-1/d*a^2*(2*cot(d*x+c)^(1/2)-1/2*2^(1/2)*(ln((1+cot(d*x+c)+2^(1/2)*cot(d*x +c)^(1/2))/(1+cot(d*x+c)-2^(1/2)*cot(d*x+c)^(1/2)))+2*arctan(1+2^(1/2)*cot (d*x+c)^(1/2))+2*arctan(-1+2^(1/2)*cot(d*x+c)^(1/2)))+1/2*I*2^(1/2)*(ln((1 +cot(d*x+c)-2^(1/2)*cot(d*x+c)^(1/2))/(1+cot(d*x+c)+2^(1/2)*cot(d*x+c)^(1/ 2)))+2*arctan(1+2^(1/2)*cot(d*x+c)^(1/2))+2*arctan(-1+2^(1/2)*cot(d*x+c)^( 1/2))))
Result contains complex when optimal does not.
Time = 0.25 (sec) , antiderivative size = 236, normalized size of antiderivative = 4.82 \[ \int \cot ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^2 \, dx=-\frac {8 \, a^{2} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} - \sqrt {\frac {16 i \, a^{4}}{d^{2}}} d \log \left (\frac {{\left (4 i \, a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt {\frac {16 i \, a^{4}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{2 \, a^{2}}\right ) + \sqrt {\frac {16 i \, a^{4}}{d^{2}}} d \log \left (\frac {{\left (4 i \, a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} - \sqrt {\frac {16 i \, a^{4}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{2 \, a^{2}}\right )}{4 \, d} \]
-1/4*(8*a^2*sqrt((I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) - 1)) - sqrt(16*I*a^4/d^2)*d*log(1/2*(4*I*a^2*e^(2*I*d*x + 2*I*c) + sqrt(16*I*a^4/ d^2)*(d*e^(2*I*d*x + 2*I*c) - d)*sqrt((I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I* d*x + 2*I*c) - 1)))*e^(-2*I*d*x - 2*I*c)/a^2) + sqrt(16*I*a^4/d^2)*d*log(1 /2*(4*I*a^2*e^(2*I*d*x + 2*I*c) - sqrt(16*I*a^4/d^2)*(d*e^(2*I*d*x + 2*I*c ) - d)*sqrt((I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) - 1)))*e^(-2* I*d*x - 2*I*c)/a^2))/d
\[ \int \cot ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^2 \, dx=- a^{2} \left (\int \tan ^{2}{\left (c + d x \right )} \cot ^{\frac {3}{2}}{\left (c + d x \right )}\, dx + \int \left (- 2 i \tan {\left (c + d x \right )} \cot ^{\frac {3}{2}}{\left (c + d x \right )}\right )\, dx + \int \left (- \cot ^{\frac {3}{2}}{\left (c + d x \right )}\right )\, dx\right ) \]
-a**2*(Integral(tan(c + d*x)**2*cot(c + d*x)**(3/2), x) + Integral(-2*I*ta n(c + d*x)*cot(c + d*x)**(3/2), x) + Integral(-cot(c + d*x)**(3/2), x))
Result contains complex when optimal does not.
Time = 0.31 (sec) , antiderivative size = 131, normalized size of antiderivative = 2.67 \[ \int \cot ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^2 \, dx=\frac {{\left (-\left (2 i - 2\right ) \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) - \left (2 i - 2\right ) \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) + \left (i + 1\right ) \, \sqrt {2} \log \left (\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right ) - \left (i + 1\right ) \, \sqrt {2} \log \left (-\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right )\right )} a^{2} - \frac {4 \, a^{2}}{\sqrt {\tan \left (d x + c\right )}}}{2 \, d} \]
1/2*((-(2*I - 2)*sqrt(2)*arctan(1/2*sqrt(2)*(sqrt(2) + 2/sqrt(tan(d*x + c) ))) - (2*I - 2)*sqrt(2)*arctan(-1/2*sqrt(2)*(sqrt(2) - 2/sqrt(tan(d*x + c) ))) + (I + 1)*sqrt(2)*log(sqrt(2)/sqrt(tan(d*x + c)) + 1/tan(d*x + c) + 1) - (I + 1)*sqrt(2)*log(-sqrt(2)/sqrt(tan(d*x + c)) + 1/tan(d*x + c) + 1))* a^2 - 4*a^2/sqrt(tan(d*x + c)))/d
\[ \int \cot ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^2 \, dx=\int { {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{2} \cot \left (d x + c\right )^{\frac {3}{2}} \,d x } \]
Timed out. \[ \int \cot ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^2 \, dx=\int {\mathrm {cot}\left (c+d\,x\right )}^{3/2}\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^2 \,d x \]